package com.kly.user.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.google.common.collect.Maps;
import com.kly.user.db.dao.UserAppsflyerReportDetailDao;
import com.kly.user.db.entity.UserAppsflyerReportDetailEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* User: yujianfu
* Date: 2023-11-15
* Time: 13:23:00.519
*/

@Repository
public class UserAppsflyerReportDetailDaoImpl extends AbstractBaseMapper<UserAppsflyerReportDetailEntity> implements UserAppsflyerReportDetailDao {

    @Override
    public UserAppsflyerReportDetailEntity selectLatestByAfId(String afId) {
        Map<String, Object> map = Maps.newHashMap();
        map.put("afId", afId);
        return this.getSqlSession().selectOne(this.getStatement("selectLatestByAfId"), map);
    }

    @Override
    public List<UserAppsflyerReportDetailEntity> listAppflyerReportDetail(List<String> afids) {
        final HashMap<String, Object> params = Maps.newHashMap();
        params.put("afids", afids);
        return this.getSqlSession().selectList(this.getStatement("listAppflyerReportDetail"), params);
    }
}